﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    </style>
    <script src="../../lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script> 
    <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function ()
        {

            var combo1 = $("#txt1").ligerComboBox({
                width : 180, 
                selectBoxWidth: 200,
                selectBoxHeight: 300, valueField: 'text', treeLeafOnly: false,
                tree: { url: '../tree/tree.json', ajaxType: 'get',idFieldName:'text' }
            }); 


            var combo2 = $("#txt2").ligerComboBox({
                width: 180,
                selectBoxWidth: 200,
                selectBoxHeight: 200, valueField: 'text',treeLeafOnly:false,
                tree: { url: '../tree/tree.json', checkbox: false, ajaxType: 'get', idFieldName: 'text' }
            });

            var combo3 = $("#txt3").ligerComboBox({
                width: 180,
                selectBoxWidth: 200,
                selectBoxHeight: 200, valueField: 'text',
                tree: { url: '../tree/tree.json', ajaxType: 'get', idFieldName: 'text' }
            });

            window.f_test = function ()
            {
                combo1.selectValue("节点1.1");
                combo2.selectValue("节点1.1");
                combo3.selectValue("节点1.1");
            };
        });


    </script>
</head>
<body style="padding:10px"> 
带复选框： <br />
   <input type="text" id="txt1"/>
     <br />
不带复选框： <br />
   <input type="text" id="txt2"/>
   <br />
只选择叶节点： <br />
   <input type="text" id="txt3"/>


    <input type="button" onclick="f_test()" value="按钮测试" style="margin-top:10px;padding:5px 10px;" />
 <div style="display:none;">
 
</div>
</body>
</html>
